#include "MyGobangAssistFunctions.h"

#include <cstdint>

MY_GOBANG_NAMESPACE_BEGIN
std::vector<std::string> split(const std::string& str, char skip)
{
    std::size_t n = str.size();
	if (n == 0)return{};
	std::vector<std::string> ans;
	std::string assist;
	std::int32_t i = 0;
	while (i < n)
	{
		if (!assist.empty() && str[i] == skip)
		{
			ans.push_back(assist);
			assist.clear();
		}
		else if (str[i] != skip)
		{
			assist += str[i];
		}
		i++;
	}
	if (!assist.empty())
	{
		ans.push_back(assist);
	}
	return ans;
}
MY_GOBANG_NAMESPACE_END